function OOB = bootstrap_initialization(PRNG,Xc,Xs,OOB,i,settings)
% initialization of the structure for OOB error estimates
if settings.bootstrap
    rand('state',double(PRNG.bootstrap(i)));
    OOB.SUB = floor(size(Xc,1)*rand(size(Xc,1),1))+1;
    OOB.ID  = setdiff(1:size(Xc,1),OOB.SUB);
    if ~isfield(OOB,'Xc')
        OOB.Xc.fusion_majority_vote = zeros(size(Xc,1),1); % majority voting fusion
        OOB.Xc.num = zeros(size(Xc,1),1); % number of fused votes
        OOB.Xs.fusion_majority_vote = zeros(size(Xs,1),1); % majority voting fusion
        OOB.Xs.num = zeros(size(Xs,1),1); % number of fused votes
    end
end
